#include "../include/stu.h"
void findbyname_s() {
    system("clear");
    printf("输入要查询的学生姓名\n");
    char name[15];
    scanf("%s",name);
    struct student *p1;
    p1 = head1;
    while (p1 != NULL){
        if(strcmp(p1->name,name) == 0){
            printf("学号：%s\n",p1->id);
            printf("姓名：%s\n",p1->name);
            printf("选修课程号：");
            for(int i = 0; i < p1->num; i++)
                printf("%d\n",p1->class[i]);
            printf("学分：%d\n",p1->credit);
            return ;
        }
        p1 = p1->next;
    }
    printf("学号不存在\n");
}
